package com.gary.spring.controller;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.web.context.WebApplicationContext;

import javax.annotation.PreDestroy;

/**
 * @author peng_rui
 * @date 2022/6/27
 */
@Scope(WebApplicationContext.SCOPE_APPLICATION)
@Component
public class BeanForApplication {

    @PreDestroy
    public void destroy() {
        System.out.println("application destroy...");
    }
}
